package com.example.shushiyunsst.util

import com.alibaba.android.arouter.facade.Postcard
import com.example.library_common.base.BaseFragmentEx
import me.yokeyword.fragmentation.ISupportFragment

fun Postcard.startNavigation(from: BaseFragmentEx) = apply {
    val to = navigation(null)
    if (to is ISupportFragment) {
        from.start(to)
    }
}

fun Postcard.startNavigationSelf(from: BaseFragmentEx) = apply {
    val to = navigation(null)
    if (to is ISupportFragment) {
        from.supportDelegate.start(to)
    }
}